package cn.ryh.jpa.controller;

import cn.ryh.jpa.entity.User;
import cn.ryh.jpa.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName UserController
 * @Description User处理器
 * @Author RaoYH
 * @Date 2018/10/30 17:25
 */
@RestController
@RequestMapping(value = "/userController")
public class UserController {
    @Resource
    private UserService userService;
    @RequestMapping(value = "/getUser")
    public User getUser(){
        User user = userService.findUserById(22);
        return user;
    }
}
